<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>思搏汇</title>
    <meta name="keywords" content="思搏汇">
    <meta name="description" content="思搏汇">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <script>if (window.top !== window.self) {
        window.top.location = window.location;
    }</script>
</head>

<body class="gray-bg">

<div class="middle-box text-center loginscreen  animated fadeInDown">
    <div>
        <div class="thumbnail">
            <div class="caption">
                <h3>思搏汇</h3>
            </div>
        </div>

    </div>
</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>

<!-- 弹出框插件3.x -->
<script src="common/js/plugin/layer/layer.js"></script>

<!-- ace工具类库-->
<script src="common/js/util/ace.js"></script>

<script>

    $(function () {

        $('html').keydown(function (e) {
            if (e.ctrlKey && e.keyCode == 13 || e.keyCode == 13) {
                $('#hlkOK').click();
            }
        });

        $('#hlkOK').click(function () {

            var username = $('#username').val();
            var password = $('#password').val();

            if ($.isNullOrEmpty(username)) {
                layer.msg('账户不能为空！');
                return;
            }

            if ($.isNullOrEmpty(password)) {
                layer.msg('密码不能为空！');
                return;
            }

            let index = layer.load(2);
            $.ajax({
                url: "/dmanageInfo/login",
                type: 'post',
                dataType: 'json',
                data: {'manageName': username, 'managePw': password},
                success: function (json) {
                    layer.close(index);
                    if (!json.success) {
                        layer.msg(json.message);
                        return;
                    }
                    layer.alert('登录成功，点击跳转首页~', {icon: 6}, function () {
                        window.location.href = '1index.html?menuAuth=' + json.data.menuAuth;
                    });
                },
                error: function () {
                    layer.msg('操作失败', {icon: 1, time: 1500});
                }
            });

        });
    });

</script>
</body>
</html>
